﻿@using SwashbucklerDiary.IServices;
@namespace SwashbucklerDiary.Components

<MTooltip Right>
    <ActivatorContent>
        <MIcon @attributes="@context.Attrs">
            mdi-alert-circle-outline
        </MIcon>
    </ActivatorContent>
    <ChildContent>
        <span>
            @(I18n.T("Experimental features"))
        </span>
    </ChildContent>
</MTooltip>

@code {

    [Inject]
    protected II18nService I18n { get; set; } = default!;
    [Inject]
    private IAlertService Alert { get; set; } = default!;

    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        if(firstRender)
        {
            await Alert.Warning(I18n.T("Experimental features"));
        }
        await base.OnAfterRenderAsync(firstRender);
    }
}
